<template>
  <div class="order">
    <!-- <van-nav-bar
      title="饿了么"
      right-text=" . . . "
    /> -->
    <div class="header">
       <HeaderCom leftText="" title="饿了么"/>
    </div>
    <div class="content">
      <ul>
        <li v-for="(item, index) in title" :key="index" @click="index1(index)" :class="{active : currentIndex == index}">{{ item }}</li>
      </ul>
      <div class="card">
        <div class="name">
          <h2>纯手工饺子(凤城九路店)</h2>
          <span>已送达</span>
        </div>
        <div class="section">
          <div class="imgBox">
            <img src="http://p1.meituan.net/deal/ec2a159e4580d16dc16aff7d65c274af174713.jpg" alt="">
            <img src="http://p1.meituan.net/deal/ec2a159e4580d16dc16aff7d65c274af174713.jpg" alt="">
          </div>
          <div class="pirce">
            <span>￥17.8</span>
            <span>共2件</span>
          </div>
        </div>
        <div class="btn">
          <span>再来一单</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import HeaderCom from '@/components/header/headerCom.vue'
export default {
   components:{
    HeaderCom,
  },
  data() {
    return {
      currentIndex:0,
      title: ["全部", "待消费", "待评价", "退款"],
    };
  },
  methods:{
    index1(index){
      this.currentIndex = index
    }
  }
};
</script>

<style scoped lang="scss">
.order{
  width: 100vw;
  height: 100vh;
  background-color: #eee;
  .header{
      padding: 10px 0;
  }
  .content{
    margin: 0 .4rem;
    ul{
      display: flex;
      margin-top: .4rem ;
      margin-bottom: .2667rem ;
      li{
        margin-right: .5333rem;
        font-size: .48rem;
        padding-bottom: .1333rem;
      }
    }
    .card{
      background-color: white;
      border-radius: .2667rem;
      padding: .2667rem;
      box-sizing: border-box;
      .name{
        display: flex;
        justify-content: space-between;
        margin: .1333rem 0;
        h2{
         font-size: .5333rem;
        } 
        span{
         font-size: .48rem;
         color: #ccc;
        }
      }
      .section{
        display: flex;
        justify-content: space-between;
        margin: .2667rem 0;
        .imgBox{
          img{
            width: 1.8667rem;
            height: 1.8667rem;
            margin-right: .1333rem;
            border-radius: .2667rem;
          }
        }
        .pirce{
          display: flex;
          flex-direction: column;
          justify-content: space-evenly;
          align-items: center;
          span:first-child{
            font-size: .5333rem;
            font-weight: 700;
          }
          span:last-child{
            font-size: .3733rem;
            color: #ccc;
          }
        }
      }
      .btn{
        text-align: right;
        margin: .5333rem 0;
        span{
          color: lightskyblue;
          font-size: .48rem;
          padding: .2667rem .48rem;
          border: .0267rem solid lightskyblue;
          border-radius: .8rem;
        }
      }
    }

  }
}
.active{
  font-weight: bold;
  border-bottom: .1067rem solid lightskyblue;
}
::v-deep .van-nav-bar__title {
  font-size: .5333rem;
  font-weight: 700;
}
::v-deep .van-nav-bar__text {
  font-size: .3733rem;
}
::v-deep .van-hairline--bottom::after{
  border-bottom: 0;
}
::v-deep .van-nav-bar {
  background-color: rgba(0,0,0,0);
}
::v-deep .capsule{
     background-color: rgba(	rgb(255, 255, 255), 0.5);
 }
 ::v-deep .van-nav-bar__title{
    font-weight: 100;
    font-size:24px
  }
::v-deep .van-nav-bar .van-icon{
        color: #000;
  }
</style>